<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>考勤数据</title>
    <?php include_once $_SERVER["DOCUMENT_ROOT"] . "/Public/include/resources.php"; ?>
</head>
<body>
<ul class="breadcrumb">
    <li><a href="/index.php/home/employee/viewList">员工管理</a> <span class="divider">/</span></li>
    <li class="active">{$entity?'编辑' : '添加'}员工</li>
</ul>
<div class="demo-content">
    <div class="row">
        <div class="span24">
            <form id="J_Form" class="form-horizontal" method="post" action="/index.php/home/employee/save">
                <input type="hidden" name="id" value="{$entity.id}"/>
                <h3>员工信息：</h3>
                <div class="control-group">
                    <label class="control-label"><s>*</s>姓名：</label>
                    <div class="controls">
                        <input type="text" class="control-text" data-rules="{required:true}" name="realName" value="{$entity.real_name}" />
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label">考勤号：</label>
                    <div class="controls">
                        <input type="text" class="control-text" name="attendanceCn" value="{$entity.attendance_cn}" />
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label">部门：</label>
                    <div class="controls">
                        <select id="department" name="department">
                            <option value="">全部</option>
                            <option value="产品中心">产品中心</option>
                            <option value="开发部">开发部</option>
                            <option value="测试部">测试部</option>
                            <option value="运营部">运营部</option>
                            <option value="销售部">销售部</option>
                            <option value="市场部">市场部</option>
                            <option value="行政部">行政部</option>
                            <option value="客户中心">客户中心</option>
                            <option value="云智盛世">云智盛世</option>
                        </select>
                    </div>
                </div>
                <div class="form-actions span5 offset3">
                    <button id="btnSearch" type="submit" class="button button-primary">提交</button>
                    <button type="reset" class="button button-primary">重置</button>
                </div>
            </form>
        </div>
    </div>
</div>
<script type="text/javascript">
    BUI.use('bui/form',function  (Form) {
        new Form.Form({
            srcNode : '#J_Form',
            submitType : 'ajax',
            callback : function(data){
                if (edy.ajaxHelp.handleAjax((data))) {
                    BUI.Message.Alert(data.message || "操作成功");
                    location.href = "/index.php/home/employee/viewList";
                }
            }
        }).render();
        $("#department").val("{$entity.department}");
    });

</script>
<!-- script end -->
</body>
</html>